<?php
switch($action){
	/************************************** system END ************************************************/
	case "system":
	$dwidth=array(0,150,500);
	$ntime=time();

$serverinfo = PHP_OS.' / PHP v'.PHP_VERSION;
$serverinfo .= @ini_get('safe_mode') ? ' Safe Mode' : NULL;
$serversoft = $_SERVER['SERVER_SOFTWARE'];
$dbversql=$db->query("select VERSION()");
$dbversion=mysql_fetch_row($dbversql);
if(@ini_get('file_uploads')) {
	$fileupload = ini_get('upload_max_filesize');
} else {
	$fileupload = '<font color="red">'.$lang['no'].'</font>';
}

$dbsize = 0;
$query = $db->query("SHOW TABLE STATUS LIKE '{$db->pre}%'");
while($table = $db->fetch_array($query)) {
	$dbsize += $table['Data_length'] + $table['Index_length'];
}
$dbsize = $dbsize ? sizeFormat($dbsize) : "——";

$bbsrow=getSettings();

$r1=$db->row_select_one("users","groupid=".GROUP_NOVERIFY,"COUNT(0) as recnum");
$r2=$db->row_select_one("topics","verifystate=1","COUNT(0) as recnum");
$r3=$db->row_select_one("posts","verifystate=1 and istopic=0","COUNT(0) as recnum");
$r4=$db->row_select_one("topics","isrecycle=1","COUNT(0) as recnum");

$globals_tips='';
if (ini_get('register_globals')){
	$globals_tips="<div style='color:red; font-weight:bold; padding:8px 5px;'>强烈建议您将PHP配置文件（php.ini）中的 register_globals 设置为Off，可大大提高网站安全性</div>";
}

echo <<<EOT
	<div id="smalltab_container" style="display:none;"></div>
	<div class="smalltab_line" style="display:none;"></div>
	<div class="div_clear" style="display:none;height:10px;"></div>
	{$globals_tips}
	<div id="t1">
		<div class="tips_1"><b>待处理事项</b></div>
		<table class="table_1">
			<tr><td class="td_6"><div class="rowdiv_0" style="width:180px;"><a href="admin.php?inc=user&action=verify">等待审核的会员数(<b>{$r1['recnum']}</b>)</a></div><div class="rowdiv_0" style="width:180px;"><a href="admin.php?inc=topic&action=verifytopic">等待审核的主题数(<b>{$r2['recnum']}</b>)</a></div><div class="rowdiv_0" style="width:180px;"><a href="admin.php?inc=topic&action=verifypost">等待审核的回复数(<b>{$r3['recnum']}</b>)</a></div><div class="rowdiv_0" style="width:180px;"><a href="admin.php?inc=topic&action=recycle">回收站中的主题数(<b>{$r4['recnum']}</b>)</a></div></td></tr>
		</table>
		<div class="div_clear" style="height:10px;"></div>
		<div class="tips_1"><b>系统信息</b></div>
		<table class="table_1">
			<tr><td class="td_6"><div class="rowdiv_0" style="width:{$dwidth[1]}px;">论坛程序版本</div><div class="rowdiv_0" style="width:{$dwidth[2]}px;">{$bbsrow['bbsversion']} &nbsp;&nbsp;&nbsp;<a href="http://www.6kbbs.com/" target="_blank">查看最新版本</a>&nbsp;&nbsp;<a href="http://www.6kbbs.com/idc" target="_blank">6KBBS主机推荐</a></div></td></tr>
			<tr><td class="td_6"><div class="rowdiv_0" style="width:{$dwidth[1]}px;">操作系统及 PHP</div><div class="rowdiv_0" style="width:{$dwidth[2]}px;">{$serverinfo}</div></td></tr>
			<tr><td class="td_6"><div class="rowdiv_0" style="width:{$dwidth[1]}px;">服务器软件</div><div class="rowdiv_0" style="width:{$dwidth[2]}px;">{$serversoft}</div></td></tr>
			<tr><td class="td_6"><div class="rowdiv_0" style="width:{$dwidth[1]}px;">MySQL 版本</div><div class="rowdiv_0" style="width:{$dwidth[2]}px;">{$dbversion[0]}</div></td></tr>
			<tr><td class="td_6"><div class="rowdiv_0" style="width:{$dwidth[1]}px;">上传许可</div><div class="rowdiv_0" style="width:{$dwidth[2]}px;">{$fileupload}</div></td></tr>
			<tr><td class="td_6"><div class="rowdiv_0" style="width:{$dwidth[1]}px;">当前数据库尺寸</div><div class="rowdiv_0" style="width:{$dwidth[2]}px;">{$dbsize}</div></td></tr>
		</table>
		<div class="div_clear" style="height:10px;"></div>
		<div class="tips_1"><b>官方论坛资讯</b></div>
		<table class="table_1">
			<tr><td class="td_6">
				<div id="offical_content"></div>
				<script type="text/javascript" src="http://www.6kbbs.net/ad/bbs_offical.php"></script>
			</td></tr>
		</table>
	</div>
	<div id="t2">
	
	</div>
	<div id="t3"></div>
	<div class="div_clear" style="height:30px;"></div>

EOT;
	break;
	/************************************** system END ************************************************/

}	
?>